<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.6 [en] (X11; I; Linux 2.2.5-15 i586) [Netscape]">
   <title>Working with projects</title>
</head>
<body>

<h1>
<a href="http://pagina.de.la.scoala"><img SRC="images/vIDE.gif" ALT="The official vIDE page at PUB" NOSAVE height=45 width=105 align=CENTER></a>Working
with precompiled modules</h1>
Use of precompiled modules is a powerful feature of vIDE that allows you
to reuse your Verilog code without the overhead of re-parsing the sources.
<p>Each precompiled module is stored inside a file with the same name as
the module's identifier and with the extension "<tt>.vo</tt>". The interpreter
expects to find such files inside the current directory or in one of those
given with the "<tt>-o</tt>" option (inside the IDE you can use the <tt>Preferences</tt>
dialog box to add custom directories).
<h3>
Using precompiled modules</h3>
They're stored in the vIDE standard library directory (called <tt>objects</tt>),
or in the directory given using either the -Dvide.libdir command-line JVM
property, or the <i>Library directory</i> option in the <i>Preferences</i>
dialog box. So, as you presume, there's nothing special to do in order
to take advantage of them. This is due to the module name resolving mechanism
(inspired from the Java Class Loader :). The module finding algorithm works
in two steps: first, a module cache is searched for a matching module for
the given name. If it isn't found, then a file with the same name as the
module and the extension "<tt>.vo</tt>" is searched inside some known directories.
If the file is found, it is assumed to contain the compiled form of the
required module, and thus loaded into the cache.
<h3>
Creating the precompiled modules</h3>

<h4>
Step one</h4>
After you finished writing&amp;testing your modules, add one (or more)
<tt>$export</tt>
directives with the following syntax:
<br><i>$export( &lt;exported_module_identifier> * );</i>
<p>This directive can be placed anywhere in the source but outside any
<b><tt>module</tt></b>or
primitive construct; also, for documentation purposes it is recommended
to put them at the top of the Verilog source file that contains the modules.
<h4>
Step two</h4>
Run the command line interpreter with the <b><tt>-l</tt></b> option. This
will cause object files to be created inside the current working directory.
You can move now the object files into a personal library directory or
in the vIDE standard library directory.
<br><a href="toc.html"><img SRC="images/back.gif" NOSAVE BORDER=0 NATURALSIZEFLAG="3" height=22 width=42 align=BOTTOM></a>
</body>
</html>
